import styles from './index.module.less'
import { ReportModule } from './ReportModule'
import type { TeacherReportData } from '@/pages/report/teacher/interface'

export const TeacherReport = (props: { data?: TeacherReportData }) => {
    const data = props.data

    return (
        <div className={styles.content}>
            <div>
                <p>{data?.create_date}</p>
                <p>{`您第一次来到${data?.platform}`}</p>
            </div>

            <ReportModule moduleKey="basic_student_module">
                <div>
                    <p>{`2024，您开展了${data?.basic_student_module?.total_course_num}个培训项目`}</p>
                    <p>{`${data?.basic_student_module?.total_group_num}期班级，共${data?.basic_student_module?.total_student_num}名参训学员`}</p>
                    <p>{`有${data?.basic_student_module?.total_quality_student_num}人培训合格，合格率${data?.basic_student_module?.quality_percent}`}</p>
                    <p>{`授课时长${data?.basic_student_module?.teach_time}`}</p>
                    <p>{`超过${data?.basic_student_module?.teach_percent}的讲师`}</p>
                </div>
            </ReportModule>

            <ReportModule moduleKey="expert_student_module">
                <div>
                    <p>{`考评${data?.expert_student_module.score_group}个班级`}</p>
                    <p>{`考评${data?.expert_student_module.score_student_num}名学员，超过${data?.expert_student_module.score_percent}的专家`}</p>
                </div>
            </ReportModule>

            <ReportModule moduleKey="region_student_module">
                <div>
                    <p>{`${data?.region_student_module
                        .map(item => `【${item.region}】`)
                        .join('、')}均有您的授课足迹`}</p>
                </div>
            </ReportModule>

            <ReportModule moduleKey="special_day_module">
                <div>
                    <p>{`${data?.special_day_module.time}授课时间是${data?.special_day_module.duration}`}</p>
                    <p>是全年授课时间最多的一天</p>
                </div>
            </ReportModule>

            <ReportModule moduleKey="category_student_module">
                <div>
                    <p>{`参训学员类型最多的是【${data?.category_student_module.category}】`}</p>
                </div>
            </ReportModule>

            <ReportModule moduleKey="degree_student_module">
                <div>
                    <p>{`参训学员文化程度最多的是【${data?.degree_student_module.degree}】`}</p>
                </div>
            </ReportModule>

            <ReportModule moduleKey="quarter_student_module">
                <div>
                    <p>{`培训时间集中在【${data?.busy_quarter}】`}</p>
                </div>
            </ReportModule>

            <ReportModule moduleKey="course_student_module">
                <div>
                    <p>{`【${data?.course_student_module[0]?.course_name}】培训量最高`}</p>
                </div>
            </ReportModule>

            <ReportModule moduleKey="expert_course_module">
                <div>
                    <p>{`【${data?.expert_course_module[0]?.course_name}】考评量最高`}</p>
                </div>
            </ReportModule>

            <div>
                <p>{`很荣幸能陪伴您走过${data?.live_day}天`}</p>
                <p>{`2025,${data?.platform}与您一起为创业之路，奠定坚实基础`}</p>
            </div>
        </div>
    )
}
